#%RAML 1.0

    title: Party API
    baseUri: #
    version: v1

    documentation:
      - title: mod-party API
        content: This documents the API calls that can be made to post party for users, and to get them

    types:
      uploadImage: !include uploadImage.json
      uploadImageCollection: !include uploadImageCollection.json
      errors: !include raml-util/schemas/errors.schema

    traits:
      validate: !include raml-util/traits/validation.raml
      language: !include raml-util/traits/language.raml
      pageable:  !include raml-util/traits/pageable.raml
      searchable: !include raml-util/traits/searchable.raml

    resourceTypes:
      collection: !include raml-util/rtypes/collection.raml
      collection-item: !include raml-util/rtypes/item-collection.raml

    /party/image:
      displayName: partyImage
      description: party from the system to some user
      type:
        collection:
          schemaCollection: uploadImageCollection
          schemaItem: uploadImage
          exampleCollection: !include examples/uploadImageCollection.sample
          exampleItem: !include examples/uploadImage.sample

      post:
        is: [validate]
      get:
        is: [
          searchable: {description: "with valid searchable fields: for example link = 1234", example: "link=/users/1234"},
          pageable,
          validate
        ]

      /{id}:
        get:
          description: "获取一个图像内含base64"
          responses:
            200:
              description: "获取图像base64成功"
              body:
                 application/json:
                   type: uploadImage
                   example:
                      strict: false
                      value: !include examples/uploadImage.sample
            400:
              description: "Bad request"
              body:
                text/plain:
                 example: "Bad request"
            500:
              description: "Internal server error"
              body:
                text/plain:
                 example: "Internal server error"
